home *** CD-ROM | disk | FTP | other *** search
/ Nejlepší České Hry / Nej české hry.iso / hry / vesmirna becherovka / 2004 Vesmírná Becherovka / Becherovka.exe / scripts / DefineSprite_2218 / frame_1 / DoAction.as < prev   
Encoding:
Text File  |  2004-09-30  |  1.5 KB  |  66 lines

  1. function Speak(Osoba, SText, Orient, EngText, Driver)
  2. {
  3.    if(Orient == "R")
  4.    {
  5.       X = getProperty(Osoba, _X) + Osoba.hx * Osoba._xscale / 100;
  6.    }
  7.    else
  8.    {
  9.       X = getProperty(Osoba, _X) - Osoba.hx * Osoba._xscale / 100;
  10.    }
  11.    Y = getProperty(Osoba, _Y) + Osoba.hy * Osoba._yscale / 100;
  12.    _root.s.bubble.Text = SText;
  13.    if(_root.menu.eng)
  14.    {
  15.       _root.s.bubble.Text = EngText;
  16.    }
  17.    _root.s.bubble.Count = 12 + length(SText);
  18.    _root.s.bubble.i = 1;
  19.    _root.s.bubble.Osoba = Osoba;
  20.    _root.s.bubble.Driver = Driver;
  21.    _root.s.bubble.Orient = Orient;
  22.    if(Orient == "R")
  23.    {
  24.       _root.s.bubble.gotoAndPlay(4);
  25.       setProperty("_root.s.bubble", _X, X + Osoba._width / 1.5);
  26.    }
  27.    else
  28.    {
  29.       _root.s.bubble.gotoAndPlay(2);
  30.       setProperty("_root.s.bubble", _X, X - Osoba._width / 1.5);
  31.    }
  32.    setProperty("_root.s.bubble", _Y, Y - 30 * Osoba._xscale / 100);
  33.    if(Orient == "L" || Orient == "R")
  34.    {
  35.       tellTarget(Osoba)
  36.       {
  37.          gotoAndStop("SpeakR");
  38.          play();
  39.       }
  40.    }
  41.    else
  42.    {
  43.       tellTarget(Osoba)
  44.       {
  45.          gotoAndPlay("Speak" + Orient);
  46.       }
  47.    }
  48. }
  49. function ShowSipka()
  50. {
  51.    stopDrag();
  52.    _root.s.Look._x = -100;
  53.    _root.s.Look._y = -100;
  54.    _root.s.Ruka._x = -100;
  55.    _root.s.Ruka._y = -100;
  56.    _root.s.Bota._x = -100;
  57.    _root.s.Bota._y = -100;
  58.    _root.s.Pick._x = -100;
  59.    _root.s.Pick._y = -100;
  60.    Mouse.show();
  61. }
  62. function HideSipka()
  63. {
  64.    Mouse.hide();
  65. }
  66.